<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<script type="text/javascript" src="http://code.jquery.com/jquery-2.1.0.min.js"></script>
<script type="text/javascript" src="calendar.js"></script>
<script type="text/javascript" src="ckeditor/ckeditor.js"></script>
<script type="text/javascript">
  function formChk() {
    var recruit_nm = $("#recruit_nm").val();
    alert(recruit_nm);
    if (recruit_nm == null || recruit_nm == "" || recruit_nm == " ") {
      alert("제목을 입력해주세요");
      document.joinForm1.recruit_nm.focus();
    } else {
      document.joinForm1.submit();
      return true;
    }
  }
  function listBtn(url) {
    console.log(url);
    location.href = "admin_recruit_list.do";
  }
</script>
<script>
  window.onload = function() {
    CKEDITOR.replace('recruit');
  }
</script>
<div id="content_work">
  <!-- 컨텐츠 -->
  <div class="work_contents3">
    <h1>
      <img src="images/newcomer/re_notice_title.gif" alt="채용공고" />
    </h1>
    <div id="middle">
      <div id="container">
        <!--mainsdhap 카테고리포함 본문상단끝-->
        <div id="mcontents">
          <div class="xans-element- xans-board xans-board-listpackage-1002 xans-board-listpackage xans-board-1002 ">
            <div id="wrapper">
              <form action="admin_recruit_write.do" method="post" onSubmit="formChk();return false" name="joinForm1">
                <table>
                  <tr>
                    <th>제목</th>
                    <td colspan="3">
                        <input type="text" name="recruit_nm" id="recruit_nm" 
                               style="width: 620px; height: 21px; border: 1px solid #320c43; background-color: #FAF7FF;" />
                    </td>
                  </tr>
                  <tr>
                    <th>신입, 경력<br> 구분
                    </th>
                    <td colspan="3">
                      <select id="recruit_cd" name="recruit_cd" style="border: 1px solid #320c43; background-color: #FAF7FF;">
                        <c:forEach var="recruit_list" items="${list }">
                          <option value="${recruit_list.dtl_cd }">${recruit_list.dtl_nm }</option>
                        </c:forEach>
                      </select>
                    </td>
                  </tr>
                  <tr>
                    <th>공고 시작일</th>
                    <td><input type="date" id="app_strt_dt" name="app_strt_dt" style="border: 1px solid #320c43; background-color: #FAF7FF;" />
                    <th>공고 종료일</th>
                    <td><input type="date" id="app_end_dt" name="app_end_dt" style="border: 1px solid #320c43; background-color: #FAF7FF;" /></td>
                  </tr>
                  <tr>
                    <td colspan="4"><textarea name="recruit" name="recruit" rows="30" cols="30" id="recruit" style="width: 500px; background-color: #FAF7FF;"></textarea></td>
                  </tr>
                  <tr>
                    <th>질문1</th>
                    <td colspan="3"><input type="text" name="self_intro_nm1" id="self_intro_nm1" style="width: 620px; border: 1px solid #320c43; background-color: #FAF7FF;" /></td>
                  </tr>
                  <tr>
                    <th>질문2</th>
                    <td colspan="3"><input type="text" name="self_intro_nm2" id="self_intro_nm2" style="width: 620px; border: 1px solid #320c43; background-color: #FAF7FF;" /></td>
                  </tr>
                  <tr>
                    <th>질문3</th>
                    <td colspan="3"><input type="text" name="self_intro_nm3" id="self_intro_nm3" style="width: 620px; border: 1px solid #320c43; background-color: #FAF7FF;" /></td>
                  </tr>
                  <tr>
                    <th>질문4</th>
                    <td colspan="3"><input type="text" name="self_intro_nm4" id=self_intro_nm4 style="width: 620px; border: 1px solid #320c43; background-color: #FAF7FF;" /></td>
                  </tr>
                  <tr>
                    <th>질문5</th>
                    <td colspan="3"><input type="text" name="self_intro_nm5" id="self_intro_nm5" style="width: 620px; border: 1px solid #320c43; background-color: #FAF7FF;" /></td>
                  </tr>
                  <tr>
                    <th>첨부파일</th>
                    <td><input type="text" name="file_num" id="file_num" style="width: 300px; border: 1px solid #320c43; background-color: #FAF7FF;" /> 
                        <input type="hidden" value="${pageContext.request.userPrincipal.name}" name="admin_num" id="admin_num" />
                    </td>
                  </tr>
                  <tr>
                    <td colspan="4" align="right">
                      <img onclick="javascript:listBtn()" src="images/newcomer/btn_list.gif" alt="목록" />
                      <input type="image" name="submit" id="submit" src="images/recruit/admin/btn_submit.gif" value="" onclick="clickButton()" />
                    </td>
                  </tr>
                </table>
              </form>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
  <!-- 컨텐츠 -->
</div>
